﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Kravl
{
    class Crawl
    {

        public Crawl()
        {

        }

        public List<Uri> processQueue(ref System.Windows.Forms.ComboBox max, ref System.Windows.Forms.ComboBox website)
        {
            
            List<Uri> queue = new List<Uri>();

            queue.Add(new Uri(website.Text));

            for (int i = 0; i < queue.Count; i++)
            {
                if (queue.Count < int.Parse(max.Text))
                {
                    List<Uri> u = new HttpWebRequest().GetWebpageUrls3(queue[i]);
                    queue.AddRange(u);
                    //i = queue.Count;
                }


            }
            return queue;
        }
    }
}
